From: Daniel van Vugt Date: Thu, 15 Jul 2021 06:18:48 +0000 (+0800) Subject: css: Add a special chroma key color and use it on .workspace-background X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~461^2^2~120 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=436fd81cfc81c5d1b34430b7f48c6ec5f4f4536c;p=gnome-shell.git css: Add a special chroma key color and use it on .workspace-background There's no visible change here since we're just moving from the default transparent black to transparent other. But the latter can be used as a special value to indicate to the rendering code when a background is expected to be always occluded. Part-of: --- diff --git a/data/theme/gnome-shell-sass/_common.scss b/data/theme/gnome-shell-sass/_common.scss index 6372af49e..f2fe78a3c 100644 --- a/data/theme/gnome-shell-sass/_common.scss +++ b/data/theme/gnome-shell-sass/_common.scss @@ -35,6 +35,11 @@ $base_border_radius: 8px; // radii of things that display over other things, e.g. popovers $modal_radius: $base_border_radius*2; // 24px +// Chroma key to flag when a background-color is always occluded, not visible. +// This allows any box-shadow behind it to be rendered more efficiently by +// omitting the middle rectangle. +$invisible_occluded_bg_color: rgba(3,2,1,0); + // fonts $base_font_size: 11; $text_shadow_color: if($variant == 'light', rgba(255,255,255,0.3), rgba(0,0,0,0.2)); diff --git a/data/theme/gnome-shell-sass/widgets/_window-picker.scss b/data/theme/gnome-shell-sass/widgets/_window-picker.scss index c71adad54..9067a6d4e 100644 --- a/data/theme/gnome-shell-sass/widgets/_window-picker.scss +++ b/data/theme/gnome-shell-sass/widgets/_window-picker.scss @@ -48,5 +48,6 @@ $window_close_button_padding: 3px; .workspace-background { // keep in sync with BACKGROUND_CORNER_RADIUS_PIXELS in workspace.js border-radius: 30px; + background-color: $invisible_occluded_bg_color; box-shadow: 0 4px 16px 4px transparentize(darken($osd_bg_color, 30%), 0.7); }